#include <stdio.h>

int main() {
    int v1, v2, v3;  // 齐王三匹马的速度
    int a1, a2, a3;  // 田忌三匹马的速度
    
    // 输入齐王马匹速度
    scanf("%d %d %d", &v1, &v2, &v3);
    
    // 输入田忌马匹速度
    scanf("%d %d %d", &a1, &a2, &a3);
    
    // 枚举田忌马匹的所有可能排列
    int tian[3] = {a1, a2, a3};
    int king[3] = {v1, v2, v3};
    int win = 0;
    
    // 排列1: a1, a2, a3
    int wins1 = 0;
    if (tian[0] > king[0]) wins1++;
    if (tian[1] > king[1]) wins1++;
    if (tian[2] > king[2]) wins1++;
    if (wins1 >= 2) {
        printf("Yes\n");
        return 0;
    }
    
    // 排列2: a1, a3, a2
    int wins2 = 0;
    if (tian[0] > king[0]) wins2++;
    if (tian[2] > king[1]) wins2++;
    if (tian[1] > king[2]) wins2++;
    if (wins2 >= 2) {
        printf("Yes\n");
        return 0;
    }
    
    // 排列3: a2, a1, a3
    int wins3 = 0;
    if (tian[1] > king[0]) wins3++;
    if (tian[0] > king[1]) wins3++;
    if (tian[2] > king[2]) wins3++;
    if (wins3 >= 2) {
        printf("Yes\n");
        return 0;
    }
    
    // 排列4: a2, a3, a1
    int wins4 = 0;
    if (tian[1] > king[0]) wins4++;
    if (tian[2] > king[1]) wins4++;
    if (tian[0] > king[2]) wins4++;
    if (wins4 >= 2) {
        printf("Yes\n");
        return 0;
    }
    
    // 排列5: a3, a1, a2
    int wins5 = 0;
    if (tian[2] > king[0]) wins5++;
    if (tian[0] > king[1]) wins5++;
    if (tian[1] > king[2]) wins5++;
    if (wins5 >= 2) {
        printf("Yes\n");
        return 0;
    }
    
    // 排列6: a3, a2, a1
    int wins6 = 0;
    if (tian[2] > king[0]) wins6++;
    if (tian[1] > king[1]) wins6++;
    if (tian[0] > king[2]) wins6++;
    if (wins6 >= 2) {
        printf("Yes\n");
        return 0;
    }
    
    printf("No\n");
    return 0;
}